public class Test {
    public void merge(int[] A,int m,int[] B,int n){
        int i = m - 1;
        int j = n - 1;
        int k = m + n - 1;
        while (i >= 0 && j >= 0){
            if(A[i] < B[j]){
                A[k--] = B[j--];
            }else {
                A[k--] = A[i--];
            }
        }
        while (i >= 0){
            A[k--] = A[i--];
        }
        while (j >= 0){
            A[k--] = B[j--];
        }
    }


    public static String func(String str){
        StringBuilder stringBuilder = new StringBuilder();
        boolean[] flas = new boolean[127];
        for (int i = 0; i < str.length() - 1; i++) {
            char ch = str.charAt(i);
            if (!flas[ch]){
                stringBuilder.append(ch);
                flas[ch] = true;
            }
        }
        return stringBuilder.toString();
    }
}

